package hyfree.sql;

import java.sql.SQLException;

public class main {
    public static void main(String[] args) {

        //检测
        SqlBase myBase=new SqlBase("root","root","mySql","3306","localhost","sds");
        try {
            myBase.initSqlBase();
            //增加
            String[] keys={"name","passWord"};
            String[] values={"jok","abc"};
            myBase._add("sds",keys,values);
            //查找
           String pass= myBase._sel("sds","passWord","name","jok");
           System.out.println(pass);
           //修改
            myBase._update("sds","name","jok","passWord","qwer");
            //删除
            myBase._del("sds","name","jok");
        }catch (SQLException e){
            e.printStackTrace();
        }
        catch (Exception e) {
            e.printStackTrace();
            System.out.println(e.toString());
        }


    }
}
